package com.joney.backstage.mapper;

import com.baomidou.mybatisplus.plugins.Page;
import com.joney.backstage.dto.UserRoleRsp;
import com.joney.backstage.entity.UserRole;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 帐户角色表 Mapper 接口
 * </p>
 *
 * @author joney123
 * @since 2018-02-07
 */
public interface UserRoleMapper extends BaseMapper<UserRole> {

    int checkPermission(@Param("userId") int userId,@Param("url") String url);

    List<String> getPermissions(@Param("userId") int userId);

    List<UserRoleRsp> queryBind(Page page, Map params);

    List<UserRoleRsp> queryNotBindUser(Page page, Map params);

    List<UserRoleRsp> queryNotBindRole(Page page, Map params);
}
